package com.cx.service.impl;

import com.cx.mapper.GroupGoodsMapper;
import com.cx.service.GroupGoodsService;
import com.cx.vo.GroupGoodsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: Zhou wei
 * @create: 2020/5/28 17:12
 */
@Service
public class GroupGoodsServiceImpl implements GroupGoodsService {

    @Autowired
    GroupGoodsMapper groupGoodsMapper;

    @Override
    public List<GroupGoodsVO> selectAll() {
        List<GroupGoodsVO> groupGoodsVOList = groupGoodsMapper.selectAll();
        return groupGoodsVOList;
    }

    @Override
    public Integer updateGroupNumber(Integer groupGoodId) {
        Integer affectedRows = groupGoodsMapper.updateGroupNumber(groupGoodId);
        return affectedRows;
    }

    @Override
    public List<GroupGoodsVO> searchByGroupGoodName(String groupGoodName) {
        List<GroupGoodsVO> groupGoodsVOList = groupGoodsMapper.searchByGroupGoodName(groupGoodName);
        return groupGoodsVOList;
    }
}
